using System;
using System.Collections;
using System.Xml;

namespace LocalBoard.Persistence
{
	/// <summary>
	/// Interface to access club profile information
	/// </summary>
	public interface IClubProfileAccessor
	{
		/// <summary>
		/// Check if the user is a member of the club or not
		/// </summary>
		/// <param name="id">User's profile id</param>
		/// <param name="clubId">Club id</param>
		/// <returns>True if user is a memeber of the club, False otherwise</returns>
		bool IsUserInTheClub(int id, int clubId);
		/// <summary>
		/// Get all user list and users' club profiles in a club
		/// </summary>
		/// <param name="clubId">club id</param>
		/// <returns>Club profile xml node object hashtable with profile id as a key</returns>
		Hashtable GetAllUserClubProfiles(int clubId);
		/// <summary>
		/// Get all club list that user joined
		/// </summary>
		/// <param name="profileId">profile id</param>
		/// <returns>Club list</returns>
		ArrayList GetAllClubsThatUserJoined(int profileId);
		/// <summary>
		/// Get club profile
		/// </summary>
		/// <param name="id">User profile id</param>
		/// <param name="clubId">Club id</param>
		/// <returns>Club profile as xml node object</returns>
		XmlNode Get(int id, int clubId);
		/// <summary>
		/// Register user as a club member and insert club profile
		/// </summary>
		/// <param name="id">User profile id to register to the club</param>
		/// <param name="clubProfile">Club profile as xml node object for insert</param>
		/// <param name="clubId">Club id</param>
		void Insert(int id, XmlNode clubProfile, int clubId);
		/// <summary>
		/// Update user's club profile
		/// </summary>
		/// <param name="id">User profile id</param>
		/// <param name="clubProfile">Club profile as xml node object for update</param>
		/// <param name="clubId">Club id</param>
		void Update(int id, XmlNode clubProfile, int clubId);
		/// <summary>
		/// Unregister user from the club and delete club profile
		/// </summary>
		/// <param name="id">User profile id to unregister from the club</param>
		/// <param name="clubId">Club id</param>
		void Delete(int id, int clubId);
	}
}
